package com.cjmp.hao.testmoduledemo_windows;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.util.Log;

import com.cjmp.hao.testmoduledemo_windows.databinding.ActivityEntryCustomBinding;
import com.cjmp.hao.moduledemo_windows.EntryEntryAbilityActivity;
import ohos.stage.ability.adapter.StageActivity;

public class EntryCustomActivity extends Activity {
    
    private ActivityEntryCustomBinding binding;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        binding = ActivityEntryCustomBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());

        Button bt = binding.button;
        bt.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(EntryCustomActivity.this, EntryEntryAbilityActivity.class);
                startActivity(intent);
            }
        });

        Intent intent = getIntent();
        String par = "";
        if (intent != null) {
            par = intent.getStringExtra("params");
            Log.i("onCreate", "CustomEntryAbility: " + par);
        }
    }
}